<?php 
session_start();
if (isset($_POST['id']) && isset($_POST['t'])){
    $openid=$_SESSION['openid'];
	$id=trim(addslashes($_POST['id']));
	$t=trim(addslashes($_POST['t']));
	 
	include_once("../c/config.php");
	$mysqli = new mysqli($dbhost, $dbuser, $dbpwd, $dbName);
	if (!$mysqli->set_charset("utf8")) {printf("Error loading character set utf8: %s\n", $mysqliTwo->error);}
	
	if ('tong' == $t){
	    $sql="update `users` set `isok`='1' where id='".$id."'";
	}else{
	    $sql="update `users` set `isok`='2' where id='".$id."'";
	    
	}
	 
	$mysqli->query($sql);
    $mysqli->close();
    echo 200;
}else{
    echo 200;
}
?>